<template>
	<view v-if="isVerify" class="not-open">
		该功能暂未开通
	</view>
	<view v-else class="main-box">
		<view>
			<image id="form-box" mode="widthFix" class="bg-image" :src="imagePath + 'top-bg.png'"></image>
			<view class="index-all-content-box">
				<view class="mobile-roll-left-box">
					<pzb-tcq-roll-left-mobile></pzb-tcq-roll-left-mobile>
				</view>
				<view class="main-form-box">
					<!-- <xmly-submit-form :mobile="formData.mobile" :param="formData.param" :submit="formData.submit"
					:btnImg="imagePath + 'submit-btn.png'"></xmly-submit-form> -->

					<pzb-tcq-auto-get-mobile :mobile="formData.mobile" :param="formData.param" :submit="formData.submit"
						:baseImagePath="imagePath" :btnImg="imagePath + 'submit-btn.png'"></pzb-tcq-auto-get-mobile>
				</view>
			</view>
			<!-- <image mode="widthFix" class="bg-image" :src="imagePath + 'bottom.png'"></image> -->
		</view>


	</view>
</template>

<script>
	import httpUtil from "@/utils/httpUtil";
	import commonApi from "@/api/commonApi";
	import userApi from "@/api/userApi";

	export default {
		data() {
			return {
				isVerify: false,
				scrollTop: 0,
				imagePath: 'https://h5.sx2b2c.com/images/pingzhi_shenghuo_dahuiyuan/zhifubao_mini/banpin/',
				scrollToTargetId: "form-box",
				formData: {
					mobile: '',
					param: '',
					submit: 0,
					intervalId: '',
				}
			}
		},
		onLoad(option) {
			this.initData(option)
		},
		onPageScroll(e) {
			this.scrollTop = e.scrollTop
		},
		methods: {
			initData(option) {
				// option.a = '000000'
				// option.param = 123
				// option.push_id = 456
				// option.pushid = 789
				// option.clickid = 234

				this.initParam(option)

				if (option.submit) {
					this.formData.submit = option.submit
				}

				commonApi.isVerify(res => {
					this.isVerify = res
				})
				commonApi.is404()
				commonApi.buriedPoint(56)
			},
			initParam(option) {
				if (option.a) {
					httpUtil.setA(option.a)
				}
				if (option.param) {
					userApi.setParam(option.param)
				}
			}
		}
	}
</script>

<style lang="scss">
	.not-open {
		height: 100vh;
		display: flex;
		justify-content: center;
		align-items: center;
		color: #000;
	}

	.main-box {
		background-color: #2C74FA;
		min-height: 100vh;
		padding-bottom: 20rpx;
	}

	.main-form-box {
		width: 90%;
		// position: absolute;
		// left: 5%;
		// bottom: 10vh;
		margin: 10rpx auto 0;
	}

	.bg-image {
		width: 100%;
		height: auto;
	}

	.index-all-content-box {
		position: absolute;
		left: 0;
		bottom: 5vw;
		width: 100%;
	}

	.mobile-roll-left-box {
		position: relative;
		margin-top: -50rpx;
	}
</style>